package week05;

import java.io.FileWriter;
import java.io.IOException;

public class GenerateCsv
{
   public static void main(String [] args)
   {
	   generateCsvFile("/home/depit/Desktop/lucian.csv");
   }

   private static void generateCsvFile(String sFileName)
	{
		try
		{
		    FileWriter writer = new FileWriter(sFileName);

			writer.append("Nume");
			writer.append(',');
			writer.append("Varsta");
			writer.append('\n');

			writer.append("Gheorghe");
			writer.append(',');
			writer.append("26");
			writer.append('\n');

			writer.append("Ionutz");
			writer.append(',');
			writer.append("29");
			writer.append('\n');

			//generate whatever data you want

			writer.flush();
			writer.close();
		}
		catch(IOException e)
		{
		 e.printStackTrace();
		}
	}
}